<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div style="float: left;height:34px;line-height:34px;">货架名称：</div>
            <div style="float: left;">
                <input type="text" class="form-control" v-model="q.name" @keyup.enter="query" placeholder="请输入内容">
            </div>

            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">货架类型：</div>
            <div style="float: left;width:160px;">
                <select class="form-control" v-model="q.type" @keyup.enter="query">
                    <option></option>
                    <option value="0">开放式货架</option>
                    <option value="1">带锁货架</option>
                </select>
            </div>

            <!--<div style="float: left;margin-left:10px;height:34px;line-height:34px;">货架分组：</div>
            <div style="float: left;width:160px;">
                <select class="form-control" v-model="q.group" @keyup.enter="query" id="group_id"></select>
            </div>-->

            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">状态：</div>
            <div style="float: left;width:160px;margin-right: 10px;">
                <select class="form-control" v-model="q.statu" @keyup.enter="query">
                    <option></option>
                    <option value="0">启用</option>
                    <option value="1">禁用</option>
                </select>
            </div>

            <a class="btn btn-primary" @click="query">搜索</a>
			<#if shiro.hasPermission("sys:goodshelves:save")>
            <a class="btn btn-primary" @click="add">&nbsp;新增货架</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red">*</span>货架名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodshelves.shelvesname" placeholder="货架名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red">*</span>货架地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodshelves.shelvesaddress" placeholder="货架地址"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red">*</span>绑定渠道</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="goodshelves.franchiseeid" id="franchisee">

                            </select>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red">*</span>货架类型</div>
                        <div class="col-sm-10" @click="getType">
                            <label class="radio-inline" style="float: left">
                                <input type="radio" name="type" value="0" v-model="goodshelves.type"/> 开放式货架
                            </label>
                            <label class="radio-inline" style="float: left">
                                <input type="radio" name="type" value="1" v-model="goodshelves.type"/> 带锁货架
                            </label>
                            <div style="display: table-cell!important;float: left;margin-left: 20px;">
                                <a href="" style="display: inline-block!important;line-height: 32px;
                                text-align: center;background-color: #fff1ce;border: 1px solid #fbcf78!important;
                                color: #f07065!important;font-size: 12px;width: 120px!important;text-decoration: none;">还没锁？立即购买</a>
                            </div>
                        </div>
                    </div>
                        <div class="form-group" hidden="true" id="lockpassword">
                        <div class="col-sm-2 control-label"><span style="color: red">*</span>蓝牙锁密码</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodshelves.lockpassword" placeholder="蓝牙锁密码"/>
                        </div>
                    </div>
                        <div class="form-group" hidden="true" id="locktype">
                            <div class="col-sm-2 control-label"><span style="color: red">*</span>开锁方式 </div>
                            <div class="col-sm-10">
                                <label class="radio-inline">
                                    <input type="radio" name="locktype" value="0" v-model="goodshelves.locktype"/> 先支付后开锁
                                    <img src="../../statics/img/ico20-question.png" title="顾客扫码后支付,再进行购物选购">
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="locktype" value="1" v-model="goodshelves.locktype"/> 先开锁后购物
                                    <img src="../../statics/img/ico20-question.png" title="顾客先行购物支付后才会开锁">
                                </label>
                            </div>
                        </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">货架分组</div>
                        <div class="col-sm-10" id="group">

                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red">*</span>联系人</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodshelves.contacts" placeholder="联系人"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red">*</span>联系电话</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodshelves.telphone" placeholder="联系电话"/>
                        </div>
                    </div>

											                    <div class="form-group">
                        <div class="col-sm-2 control-label">微信号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodshelves.wx" placeholder="微信号"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">状态</div>
                        <div class="col-sm-10">
                            <label class="radio-inline">
                                <input type="radio" name="statu" value="0" v-model="goodshelves.statu"/> 启用
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="statu" value="1" v-model="goodshelves.statu"/> 禁用
                            </label>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">备注</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="goodshelves.remark" placeholder="备注"/>
                        </div>
                    </div>

							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>


    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <form class="form-horizontal">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div class="form-group">
                            <div class="col-sm-2 control-label"><span style="color: red">*</span>页面路径</div>
                            <div class="col-sm-10" style="width: 260px;">
                                <input type="text" class="form-control"  placeholder="页面路径">
                            </div>
                            <a class="btn btn-primary" @click="query">复制</a>
                        </div>

                    </div>
                    <div class="modal-body">
                        <div style="padding: 20px 0;margin: 0 30px;margin-left: 100px;">
                            <div style="display: table-cell!important;padding-right: 15px;">
                                <img width="132" height="155"></img>
                            </div>
                            <div style="display: table-cell!important;font-size: 14px;color: #4c4948;line-height: 1!important;;">
                                <p style="margin-bottom: 5px;margin: 0 0 10px;">扫码进入</p>
                                <p style="margin: 0!important;margin: 0 0 10px;"></p>
                            </div>
                        </div>
                        <div style="padding: 20px 0;margin: 0 30px;border-top: 1px solid #eaeaea;">
                            <div style="margin-left: 80px;">
                                <button type="button"  class="btn btn-primary" style="background-color: #f07065!important;color: #fff;border: none;" data-dismiss="modal" @click="">下载二维码</button>
                                <button type="button" id="btn_submit" class="btn btn-primary" style="margin-left: 200px;" data-dismiss="modal" @click="saveOrUpdate">确认</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/goodshelves.js?_${.now?long}"></script>
</body>
</html>